import React, {Component} from 'react'
import {connect} from 'react-redux'
import { NavBar, Icon } from 'antd-mobile';
// import {withRouter} from 'react-router-dom'
import './header.scss'
export interface IExampleProps {
  title:string,
  leftBack:boolean,
  rightShow:boolean
}
class HeaderBase extends Component<IExampleProps>{
	 constructor(props:IExampleProps) {
	        super(props);
	        this.state = {}
	        this.renderChild = this.renderChild.bind(this)
	 }
	  renderChild (child:any) { // 控制内容的分发
	       
	     }
	 componentDidMount() {
	     console.log("this",this)
	  }
    render() {
        return (
            <div><NavBar
                 mode="light"
                 icon={<Icon type="left" />}
                 onLeftClick={() => console.log('onLeftClick')}
                 rightContent={[
                   <Icon key="0" type="search" style={{ marginRight: '16px' }} />,
                   <Icon key="1" type="ellipsis" />,
                 ]}
               >NavBar</NavBar>
			</div>
        )
    }
}
export default connect()(HeaderBase)